<?php
/*
 * IKPHP 爱客开源社区 @copyright (c) 2012-3000 IKPHP All Rights Reserved 
 * @Author 小麦
 * @Email:ikphp@sina.cn
 */
class model_setting extends model {
    /**
     * 获取配置信息写入缓存
     */
    public function setting_cache() {
        $setting = array();
        $res = $this->getField('name,data');
        foreach ($res as $key=>$val) {
            $setting['ik_'.$key] = unserialize($val) ? unserialize($val) : $val;
        }
        S('setting', $setting);
        return S('setting');
    }
}